package com.kexun.dao;

import com.kexun.pojo.*;

import java.util.List;
import java.util.Map;

public interface AdmDao {
    /**
     * ajax实现填充数据
     * @param userNum
     * @return
     */
    User findInfo(String userNum);


    /**
     * 修改用户信息
     *
     * @param user
     * @return
     */
    int updateAdm(User user);

    /**
     * 课程信息查看
     * @return
     */
    Map<String, Object> finAllCos(String limitStr ,String pageStr);


    /**
     * 修改课程信息
     *
     * @param course
     * @return
     */
    int editCos(Course course);

    /**
     * 添加课程信息
     * @param course
     * @return
     */
    int addCourse(Course course);

    /**
     * 删除课程
     * @param couName
     * @return
     */
    int delCouse(String couName);

    List<Course> finAllCourse();

    /**
     * 查找一个课程的信息
     * @param userNum
     * @return
     */
    Map<String,Object> finOneCourse(String userNum);

    Map<String, Object> finScoreAll(int limit, int page);

    Map<String, Object> findTeaInfoAll(int limit, int page);

    Teacher findTeacher(String teaNum);

    int editTeacher(Teacher teacher);

    int delTea(String teaNum);

    int addTeacher(User user, Teacher teacher);

    Course findCouse(String couName);


    Score findScore(String stuNum,String courseName);

    int editSco(Score score);

    int delSco(String stuNum);

    int addScore(Score score);

    Map<String, Object> allStuSco(String limit, String page);


    Map<String, Object> findScoreLike(String courseName, String stuNum, String stuName, String stuClass, String major, String limitStr, String pageStr);

    Map<String, Object> findStudentAll(String limitStr, String pageStr);

    Student finStudent(String stuNum, String stuName, String stuClass);

    int editStu(Student student);

    int delStu(String stuNum, String stuName, String stuClass);

    int addStudent(User user, Student student);

    Map<String, Object> findUsrAll(String limitStr, String pageStr);

    Usert findUser(String userNum);

    int editUsr(User user);

    int addUser(Usert user);
}
